Integrand size = 21, antiderivative size = 130 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=b \left (3 a^2-b^2\right ) x+\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}+\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {3 a^2 b \cot ^3(c+d x)}{4 d}+\frac {a \left (a^2-3 b^2\right ) \log (\sin (c+d x))}{d}-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d} \]
b*(3*a^2-b^2)*x+b*(3*a^2-b^2)*cot(d*x+c)/d+1/2*a*(a^2-3*b^2)*cot(d*x+c)^2/ d-3/4*a^2*b*cot(d*x+c)^3/d+a*(a^2-3*b^2)*ln(sin(d*x+c))/d-1/4*a^2*cot(d*x+ c)^4*(a+b*tan(d*x+c))/d
Result contains complex when optimal does not.
Time = 1.71 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.91 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {4 b \left (-3 a^2+b^2\right ) \cot (c+d x)-2 a \left (a^2-3 b^2\right ) \cot ^2(c+d x)+4 a^2 b \cot ^3(c+d x)+a^3 \cot ^4(c+d x)+2 (a-i b)^3 \log (i-\cot (c+d x))+2 (a+i b)^3 \log (i+\cot (c+d x))}{4 d} \]
-1/4*(4*b*(-3*a^2 + b^2)*Cot[c + d*x] - 2*a*(a^2 - 3*b^2)*Cot[c + d*x]^2 + 4*a^2*b*Cot[c + d*x]^3 + a^3*Cot[c + d*x]^4 + 2*(a - I*b)^3*Log[I - Cot[c + d*x]] + 2*(a + I*b)^3*Log[I + Cot[c + d*x]])/d
Time = 0.93 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.08, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.714, Rules used = {3042, 4048, 3042, 4111, 27, 3042, 4012, 3042, 4012, 25, 3042, 4014, 3042, 25, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^3}{\tan (c+d x)^5}dx\) |
\(\Big \downarrow \) 4048 |
\(\displaystyle \frac {1}{4} \int \cot ^4(c+d x) \left (9 b a^2-4 \left (a^2-3 b^2\right ) \tan (c+d x) a-b \left (3 a^2-4 b^2\right ) \tan ^2(c+d x)\right )dx-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {9 b a^2-4 \left (a^2-3 b^2\right ) \tan (c+d x) a-b \left (3 a^2-4 b^2\right ) \tan (c+d x)^2}{\tan (c+d x)^4}dx-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 4111 |
\(\displaystyle \frac {1}{4} \left (\int -4 \cot ^3(c+d x) \left (a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)\right )dx-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{4} \left (-4 \int \cot ^3(c+d x) \left (a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)\right )dx-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-4 \int \frac {a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)}{\tan (c+d x)^3}dx-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{4} \left (-4 \left (\int \cot ^2(c+d x) \left (b \left (3 a^2-b^2\right )-a \left (a^2-3 b^2\right ) \tan (c+d x)\right )dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-4 \left (\int \frac {b \left (3 a^2-b^2\right )-a \left (a^2-3 b^2\right ) \tan (c+d x)}{\tan (c+d x)^2}dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{4} \left (-4 \left (\int -\cot (c+d x) \left (a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)\right )dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{4} \left (-4 \left (-\int \cot (c+d x) \left (a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)\right )dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-4 \left (-\int \frac {a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \tan (c+d x)}{\tan (c+d x)}dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {1}{4} \left (-4 \left (-a \left (a^2-3 b^2\right ) \int \cot (c+d x)dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}-b x \left (3 a^2-b^2\right )\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (-4 \left (-a \left (a^2-3 b^2\right ) \int -\tan \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}-b x \left (3 a^2-b^2\right )\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{4} \left (-4 \left (a \left (a^2-3 b^2\right ) \int \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}-b x \left (3 a^2-b^2\right )\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{4} \left (-4 \left (-\frac {a \left (a^2-3 b^2\right ) \cot ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cot (c+d x)}{d}-\frac {a \left (a^2-3 b^2\right ) \log (-\sin (c+d x))}{d}-b x \left (3 a^2-b^2\right )\right )-\frac {3 a^2 b \cot ^3(c+d x)}{d}\right )-\frac {a^2 \cot ^4(c+d x) (a+b \tan (c+d x))}{4 d}\) |
((-3*a^2*b*Cot[c + d*x]^3)/d - 4*(-(b*(3*a^2 - b^2)*x) - (b*(3*a^2 - b^2)* Cot[c + d*x])/d - (a*(a^2 - 3*b^2)*Cot[c + d*x]^2)/(2*d) - (a*(a^2 - 3*b^2 )*Log[-Sin[c + d*x]])/d))/4 - (a^2*Cot[c + d*x]^4*(a + b*Tan[c + d*x]))/(4 *d)
3.5.43.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && N eQ[a*c + b*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*c - a*d)^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 + d^2))), x] - Simp[1 /(d*(n + 1)*(c^2 + d^2)) Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^(n + 1)*Simp[a^2*d*(b*d*(m - 2) - a*c*(n + 1)) + b*(b*c - 2*a*d)*(b*c *(m - 2) + a*d*(n + 1)) - d*(n + 1)*(3*a^2*b*c - b^3*c - a^3*d + 3*a*b^2*d) *Tan[e + f*x] - b*(a*d*(2*b*c - a*d)*(m + n - 1) - b^2*(c^2*(m - 2) - d^2*( n + 1)))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 2] && LtQ [n, -1] && IntegerQ[2*m]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 - a*b*B + a^2*C)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 + b^2))), x ] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[b*B + a*(A - C) - (A*b - a*B - b*C)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B , C}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0] && LtQ[m, -1] && NeQ[a^2 + b^2, 0 ]
Time = 0.57 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.05
method | result | size |
derivativedivides | \(\frac {\frac {\left (-a^{3}+3 a \,b^{2}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (3 a^{2} b -b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )-\frac {a^{3}}{4 \tan \left (d x +c \right )^{4}}+a \left (a^{2}-3 b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )+\frac {a \left (a^{2}-3 b^{2}\right )}{2 \tan \left (d x +c \right )^{2}}-\frac {a^{2} b}{\tan \left (d x +c \right )^{3}}+\frac {b \left (3 a^{2}-b^{2}\right )}{\tan \left (d x +c \right )}}{d}\) | \(137\) |
default | \(\frac {\frac {\left (-a^{3}+3 a \,b^{2}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (3 a^{2} b -b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )-\frac {a^{3}}{4 \tan \left (d x +c \right )^{4}}+a \left (a^{2}-3 b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )+\frac {a \left (a^{2}-3 b^{2}\right )}{2 \tan \left (d x +c \right )^{2}}-\frac {a^{2} b}{\tan \left (d x +c \right )^{3}}+\frac {b \left (3 a^{2}-b^{2}\right )}{\tan \left (d x +c \right )}}{d}\) | \(137\) |
norman | \(\frac {\frac {b \left (3 a^{2}-b^{2}\right ) \left (\tan ^{3}\left (d x +c \right )\right )}{d}+b \left (3 a^{2}-b^{2}\right ) x \left (\tan ^{4}\left (d x +c \right )\right )-\frac {a^{3}}{4 d}+\frac {a \left (a^{2}-3 b^{2}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a^{2} b \tan \left (d x +c \right )}{d}}{\tan \left (d x +c \right )^{4}}+\frac {a \left (a^{2}-3 b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {a \left (a^{2}-3 b^{2}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(151\) |
parallelrisch | \(\frac {-\left (\cot ^{4}\left (d x +c \right )\right ) a^{3}-4 \left (\cot ^{3}\left (d x +c \right )\right ) a^{2} b +2 \left (\cot ^{2}\left (d x +c \right )\right ) a^{3}-6 \left (\cot ^{2}\left (d x +c \right )\right ) a \,b^{2}+12 a^{2} b d x -4 b^{3} d x +4 a^{3} \ln \left (\tan \left (d x +c \right )\right )-12 \ln \left (\tan \left (d x +c \right )\right ) a \,b^{2}-2 \ln \left (\sec ^{2}\left (d x +c \right )\right ) a^{3}+6 \ln \left (\sec ^{2}\left (d x +c \right )\right ) a \,b^{2}+12 \cot \left (d x +c \right ) a^{2} b -4 \cot \left (d x +c \right ) b^{3}}{4 d}\) | \(153\) |
risch | \(3 a^{2} b x -b^{3} x -i a^{3} x +3 i a \,b^{2} x -\frac {2 i a^{3} c}{d}+\frac {6 i a \,b^{2} c}{d}-\frac {2 i \left (-2 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+3 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-6 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+2 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-6 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+12 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}-3 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-2 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+3 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-10 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}+4 a^{2} b -b^{3}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}\) | \(301\) |
1/d*(1/2*(-a^3+3*a*b^2)*ln(1+tan(d*x+c)^2)+(3*a^2*b-b^3)*arctan(tan(d*x+c) )-1/4*a^3/tan(d*x+c)^4+a*(a^2-3*b^2)*ln(tan(d*x+c))+1/2*a*(a^2-3*b^2)/tan( d*x+c)^2-a^2*b/tan(d*x+c)^3+b*(3*a^2-b^2)/tan(d*x+c))
Time = 0.25 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.17 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{4} + {\left (3 \, a^{3} - 6 \, a b^{2} + 4 \, {\left (3 \, a^{2} b - b^{3}\right )} d x\right )} \tan \left (d x + c\right )^{4} - 4 \, a^{2} b \tan \left (d x + c\right ) + 4 \, {\left (3 \, a^{2} b - b^{3}\right )} \tan \left (d x + c\right )^{3} - a^{3} + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \tan \left (d x + c\right )^{2}}{4 \, d \tan \left (d x + c\right )^{4}} \]
1/4*(2*(a^3 - 3*a*b^2)*log(tan(d*x + c)^2/(tan(d*x + c)^2 + 1))*tan(d*x + c)^4 + (3*a^3 - 6*a*b^2 + 4*(3*a^2*b - b^3)*d*x)*tan(d*x + c)^4 - 4*a^2*b* tan(d*x + c) + 4*(3*a^2*b - b^3)*tan(d*x + c)^3 - a^3 + 2*(a^3 - 3*a*b^2)* tan(d*x + c)^2)/(d*tan(d*x + c)^4)
Time = 1.76 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.58 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=\begin {cases} \tilde {\infty } a^{3} x & \text {for}\: c = 0 \wedge d = 0 \\x \left (a + b \tan {\left (c \right )}\right )^{3} \cot ^{5}{\left (c \right )} & \text {for}\: d = 0 \\\tilde {\infty } a^{3} x & \text {for}\: c = - d x \\- \frac {a^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{3} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} + \frac {a^{3}}{2 d \tan ^{2}{\left (c + d x \right )}} - \frac {a^{3}}{4 d \tan ^{4}{\left (c + d x \right )}} + 3 a^{2} b x + \frac {3 a^{2} b}{d \tan {\left (c + d x \right )}} - \frac {a^{2} b}{d \tan ^{3}{\left (c + d x \right )}} + \frac {3 a b^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - \frac {3 a b^{2} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} - \frac {3 a b^{2}}{2 d \tan ^{2}{\left (c + d x \right )}} - b^{3} x - \frac {b^{3}}{d \tan {\left (c + d x \right )}} & \text {otherwise} \end {cases} \]
Piecewise((zoo*a**3*x, Eq(c, 0) & Eq(d, 0)), (x*(a + b*tan(c))**3*cot(c)** 5, Eq(d, 0)), (zoo*a**3*x, Eq(c, -d*x)), (-a**3*log(tan(c + d*x)**2 + 1)/( 2*d) + a**3*log(tan(c + d*x))/d + a**3/(2*d*tan(c + d*x)**2) - a**3/(4*d*t an(c + d*x)**4) + 3*a**2*b*x + 3*a**2*b/(d*tan(c + d*x)) - a**2*b/(d*tan(c + d*x)**3) + 3*a*b**2*log(tan(c + d*x)**2 + 1)/(2*d) - 3*a*b**2*log(tan(c + d*x))/d - 3*a*b**2/(2*d*tan(c + d*x)**2) - b**3*x - b**3/(d*tan(c + d*x )), True))
Time = 0.29 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.04 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {4 \, {\left (3 \, a^{2} b - b^{3}\right )} {\left (d x + c\right )} - 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 4 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (d x + c\right )\right ) - \frac {4 \, a^{2} b \tan \left (d x + c\right ) - 4 \, {\left (3 \, a^{2} b - b^{3}\right )} \tan \left (d x + c\right )^{3} + a^{3} - 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{4}}}{4 \, d} \]
1/4*(4*(3*a^2*b - b^3)*(d*x + c) - 2*(a^3 - 3*a*b^2)*log(tan(d*x + c)^2 + 1) + 4*(a^3 - 3*a*b^2)*log(tan(d*x + c)) - (4*a^2*b*tan(d*x + c) - 4*(3*a^ 2*b - b^3)*tan(d*x + c)^3 + a^3 - 2*(a^3 - 3*a*b^2)*tan(d*x + c)^2)/tan(d* x + c)^4)/d
Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (124) = 248\).
Time = 1.61 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.32 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 24 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 72 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 96 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 192 \, {\left (3 \, a^{2} b - b^{3}\right )} {\left (d x + c\right )} + 192 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 192 \, {\left (a^{3} - 3 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {400 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1200 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 360 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 96 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 72 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
-1/192*(3*a^3*tan(1/2*d*x + 1/2*c)^4 - 24*a^2*b*tan(1/2*d*x + 1/2*c)^3 - 3 6*a^3*tan(1/2*d*x + 1/2*c)^2 + 72*a*b^2*tan(1/2*d*x + 1/2*c)^2 + 360*a^2*b *tan(1/2*d*x + 1/2*c) - 96*b^3*tan(1/2*d*x + 1/2*c) - 192*(3*a^2*b - b^3)* (d*x + c) + 192*(a^3 - 3*a*b^2)*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 192*(a^3 - 3*a*b^2)*log(abs(tan(1/2*d*x + 1/2*c))) + (400*a^3*tan(1/2*d*x + 1/2*c) ^4 - 1200*a*b^2*tan(1/2*d*x + 1/2*c)^4 - 360*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 96*b^3*tan(1/2*d*x + 1/2*c)^3 - 36*a^3*tan(1/2*d*x + 1/2*c)^2 + 72*a*b^2 *tan(1/2*d*x + 1/2*c)^2 + 24*a^2*b*tan(1/2*d*x + 1/2*c) + 3*a^3)/tan(1/2*d *x + 1/2*c)^4)/d
Time = 4.94 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.12 \[ \int \cot ^5(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (3\,a\,b^2-a^3\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,{\left (a+b\,1{}\mathrm {i}\right )}^3}{2\,d}-\frac {{\mathrm {cot}\left (c+d\,x\right )}^4\,\left ({\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {3\,a\,b^2}{2}-\frac {a^3}{2}\right )-{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (3\,a^2\,b-b^3\right )+\frac {a^3}{4}+a^2\,b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,{\left (b+a\,1{}\mathrm {i}\right )}^3\,1{}\mathrm {i}}{2\,d} \]